import request from '@/utils/request'


//统一字典下拉框查询
export function adminDict(params) {
  return request({
    url: `common/v1/adminDict`,
    method: 'get',
    params
  })
}
//联动信息
export function adminGetMerchantBill(params) {
  return request({
    url: `/merchant/bill/v1/adminGetMerchantBill`,
    method: 'get',
    params
  })
}

//联动信息-新
export function adminGetMerchantBillNew(params) {
  return request({
    url: `/merchant/bill/v1/merchantBgBills`,
    method: 'get',
    params
  })
}

//提现列表
export function withdrawalList(params) {
  return request({
    url: `/merchant/withdraw/money/v1/list`,
    method: 'get',
    params
  })
}
//资金账户列表
export function getMoneyList(params) {
  return request({
    url: `/entry/v1/fund/`,
    method: 'get',
    params
  })
}
//资金账户删除
export function deleteList(id) {
  return request({
    url: `/entry/v1/fund/${id}`,
    method: 'delete',
  })
}
//省市县三级编码
export function getarea(params) {
  return request({
    url: '/entry/v1/hlb/area/',
    method: 'get',
    params
  })
}
//获取经营编码类别
export function getMcc(params) {
  return request({
    url: '/entry/v1/hlb/mcc',
    method: 'get',
    params
  })
}

//查询提现审核详情
export function auditDetail(params) {
  return request({
    url: `/merchant/withdraw/money/v1/auditDetail`,
    method: 'get',
    params
  })
}
//手动打款-拒绝
export function manualReject(params) {
  return request({
    url: `/merchant/withdraw/money/v1/manual/refuse`,
    method: 'put',
    headers: {
      'Content-Type': 'application/x-www-form-urlencoded'
    },
    params
  })
}
//手动打款-同意
export function manualAgree(params) {
  return request({
    url: `/merchant/withdraw/money/v1/manual/agree`,
    method: 'put',
    headers: {
      'Content-Type': 'application/x-www-form-urlencoded'
    },
    params
  })
}
//手动打款-详情

export function manualDetail(id) {
  return request({
    url: `/merchant/withdraw/money/v1/manual/${id}`,
    method: 'get',
  })
}

//新建
export function addHlb(data) {
  return request({
    url: '/entry/v1/hlb',
    method: 'post',
    data
  })
}
//合利宝进件状态--第一步和第二步

export function getOneResults(params) {
  return request({
    url: `/entry/v1/hlb/queryEntryStatus`,
    method: 'get',
    params
  })
}

// 同意
export function approved(id) {
  return request({
    url: `/merchant/withdraw/money/v1/agree`,
    method: 'put',
    headers: {
      'Content-Type': 'application/x-www-form-urlencoded'
    },
    params: {
      id
    }
  })
}

// 拒绝
export function reject(params) {
  return request({
    url: `/merchant/withdraw/money/v1/reject`,
    method: 'put',
    headers: {
      'Content-Type': 'application/x-www-form-urlencoded'
    },
    params
  })
}

// 提现详情
export function adminWithdrawMoneyInfo(params) {
  return request({
    url: `/merchant/withdraw/money/v1/adminWithdrawMoneyInfo`,
    method: 'get',
    params
  })
}

// 账单概要
export function adminMerchantBillInfo(params) {
  return request({
    url: `/merchant/bill/v1/adminMerchantBillInfo`,
    method: 'get',
    params
  })
}

// 账单详情
export function adminGeyBillInfo(params) {
  return request({
    url: `/merchant/bill/v1/adminGeyBillInfo`,
    method: 'get',
    params
  })
}
//提交第三步费率资料
export function addOpenProduct(data) {
  return request({
    url: `/entry/v1/hlb/openProduct`,
    method: 'post',
    data
  })
}

//查看步骤
export function getqueryStpeStatus(params) {
  return request({
    url: `/entry/v1/hlb/queryStpeStatus`,
    method: 'get',
    params
  })

}
//合利宝产品开通状态查询（费率）
export function getqueryStatus(id) {
  return request({
    url: `/entry/v1/hlb/openProduct/queryStatus/${id}`,
    method: 'get',
  })

}
//合利宝资质文件详情
export function getCredential(id) {
  return request({
    url: `/entry/v1/hlb/credential/${id}`,
    method: 'get',
  })

}
//合利宝资质照片批量上传

export function editImgArr(data) {
  return request({
    url: `/entry/v1/hlb/credential/`,
    method: 'put',
    data
  })

}

//合利宝子账户基本信息回显
export function geteditDetail(id) {
  return request({
    url: `/entry/v1/hlb/editDetail/${id}`,
    method: 'get',
  })
}
//合利宝产品开通详情（费率）
export function getopenProductDetail(id) {
  return request({
    url: `/entry/v1/hlb/openProduct/detail/${id}`,
    method: 'get',
  })
}
//合利宝产品微信报备接口状态

export function getwxApplyQueryStatus(id) {
  return request({
    url: `/entry/v1/hlb/wxApply/queryStatus/${id}`,
    method: 'get',
  })
}

//合利宝电子签章连接
export function getcreateCode(id) {
  return request({
    url: `/entry/v1/hlb/signature/createCode/${id}`,
    method: 'get',
  })
}

//合利宝签章详情
export function getInfo(code) {
  return request({
    url: `/entry/v1/hlb/signature/info/${code}`,
    method: 'get',
  })
}

//资金账户详情--管理页面
export function getDetail(id) {
  return request({
    url: `/entry/v1/fund/view/${id}`,
    method: 'get',
  })
}
//合利宝结算卡变更
export function editSettlement(data) {
  return request({
    url: `/entry/v1/hlb/settlebank/apply/`,
    method: 'put',
    data
  })
}
//合利宝结算卡变更状态
export function getapplyqueryStatus(id) {
  return request({
    url: `/entry/v1/hlb/settlebank/apply/queryStatus/${id}`,
    method: 'get',
  })
}

//合利宝结算卡变更状态
export function getfeeRanges(id) {
  return request({
    url: `/entry/v1/hlb/openProduct/feeRanges/${id}`,
    method: 'get',
  })
}

//合利宝结算卡变更状态
export function getComplete(id) {
  return request({
    url: `/entry/v1/fund/complete/${id}`,
    method: 'get',
  })
}

//修改结算方式回显原数据

export function gettlebankInfo(id) {
  return request({
    url: `/entry/v1/hlb/settlebank/info/${id}`,
    method: 'get',
  })
}

//资金账户列表
export function manageList(params) {
  return request({
    url: `/merchant/fund/account/manage/list`,
    method: 'get',
    params
  })
}

//查询资金账户管理列表状态总数
export function managestatusCount() {
  return request({
    url: `/merchant/fund/account/manage/statusCount`,
    method: 'get',
  })
}

//关联资金账户
export function associate(params) {
  return request({
    url: `/merchant/fund/account/manage/associate`,
    method: 'put',
    headers: {
      'Content-Type': 'application/x-www-form-urlencoded'
    },
    params
  })
}
//拒绝关联资金账户
export function manageRefuse(id) {
  return request({
    url: `/merchant/fund/account/manage/refuse/${id}`,
    method: 'put',
    headers: {
      'Content-Type': 'application/x-www-form-urlencoded'
    },
  })
}
//更换资金账户
export function payFundAccount(data) {
  return request({
    url: `/merchant/fund/account/manage/payFundAccount`,
    method: 'put',
    data
  })
}
//查询资金帐号详情

export function managedetail(id) {
  return request({
    url: `/merchant/fund/account/manage/detail/${id}`,
    method: 'get',
  })
}


export function fundAccountSelect() {
  return request({
    url: `/merchant/fund/account/manage/fundAccountSelect`,
    method: 'get',
  })
}

//修改结算账户
export function settleAccount(data) {
  return request({
    url: `/merchant/fund/account/manage/settleAccount`,
    method: 'put',
    data
  })
}


// 取消生效
export function cancelTake(id) {
  return request({
    url: `/merchant/fund/account/manage/cancel/${id}`,
    method: 'put',
  })
}

//查询支付接口信息
export function getPayFundAccount(id) {
  return request({
    url: `/merchant/fund/account/manage/payFundAccount/${id}`,
    method: 'get',
  })
}
//汇入汇出列表
export function fundLog(params) {
  return request({
    url: `/platform/fund/log/`,
    method: 'get',
    params
  })
}
//查询结果-商家统计
export function funaccountCount(params) {
  return request({
    url: `/platform/fund/log/accountCount`,
    method: 'get',
    params
  })
}

//提现列表
export function withdrawalListNew(params) {
  return request({
    url: `/platform/withdraw/manage`,
    method: 'get',
    params
  })
}
//提现详情2.0--商家

export function manualDetailNew(withdrawNo) {
  return request({
    url: `/platform/withdraw/manage/merchant/${withdrawNo}`,
    method: 'get',
  })
}
//提现详情2.0--用户

export function manageCustomer(withdrawNo) {
  return request({
    url: `/platform/withdraw/manage/customer/${withdrawNo}`,
    method: 'get',
  })
}
//提现详情2.0--拒绝（用户）
export function manualRejectCustomer(params) {
  return request({
    url: `/customer/withdraw/money/refuse`,
    method: 'put',
    headers: {
      'Content-Type': 'application/x-www-form-urlencoded'
    },
    params
  })
}
//提现详情2.0--同意（用户）
export function manualAgreeCustomer(params) {
  return request({
    url: `/customer/withdraw/money/agree`,
    method: 'put',
    headers: {
      'Content-Type': 'application/x-www-form-urlencoded'
    },
    params
  })
}
//提现详情2.0--删除
export function deleteManaget(id) {
  return request({
    url: `/platform/withdraw/manage/${id}`,
    method: 'delete',
  })
}

//银行存管与释放规则-查询店铺行业类型
export function getShopTypeList(params) {
  return request({
    url: `/common/v1/shopTypeListAll`,
    method: 'get',
    params
  })
}


//银行存管与释放规则-查询存管信息分页数据
export function getdepositList(params) {
  return request({
    url: `/merchant/deposit/v1/list`,
    method: 'get',
    params
  })
}

//银行存管与释放规则-新增或者编辑时查询店铺行业
export function getaddshopTypeList(params) {
  return request({
    url: `/merchant/deposit/v1/shopTypeList`,
    method: 'get',
    params
  })
}


//银行存管与释放规则-新增银行存管及释放规则
export function addbankSupervision(data) {
  return request({
    url: `/merchant/deposit/v1`,
    method: 'post',
    data
  })
}


//银行存管与释放规则-查询存管信息详情
export function bankSupervisionDetail(id) {
  return request({
    url: `/merchant/deposit/v1/detail/${id}`,
    method: 'get',
  })
}

//银行存管与释放规则-查询存管信息详情
export function editbankSupervision(data) {
  return request({
    url: `/merchant/deposit/v1`,
    method: 'put',
    data
  })
}
//
export function updateAgree(params) {
  return request({
    url: `/merchant/withdraw/money/v1/update/agree`,
    method: 'put',
    headers: {
      'Content-Type': 'application/x-www-form-urlencoded'
    },
    params
  })
}
//查询银盛银行信息
export function getBank(params) {
  return request({
    url: `/entry/v1/fund/ys/bank`,
    method: 'get',
    params
  })
}
//更新商家费率
export function payFundFee(params) {
  return request({
    url: `/merchant/fund/account/manage/fee`,
    method: 'put',
    headers: {
      'Content-Type': 'application/x-www-form-urlencoded'
    },
    params
  })
}

//第三方商户进件 发放签约短信
export function ysSendSignSms(params) {
  return request({
    url: `/entry/v1/fund/send/sms`,
    method: 'put',
    headers: {
      'Content-Type': 'application/x-www-form-urlencoded'
    },
    params
  })
}
//初始化银盛存管帐号信息
export function ysDepositInfo(merchantId) {
  return request({
    url: `/entry/v1/fund/init/ys/depositInfo/${merchantId}`,
    method: 'put'
  })
}

// 解绑id (商家Id)
export function clearMerchantId(params) {
  return request({
    url: `/merchant/fund/account/manage/clearMerchantId`,
    method: 'put',
    params
  })
}

//2023-4-12
//预付卡退卡查询
export function adminCustomerCardReturnList(params) {
  return request({
    url: `/asset/card/return/v1/adminCustomerCardReturnList`,
    method: 'get',
    params
  })
}
//店铺查询
export function shopSelect(params) {
  return request({
    url: `/common/v1/shop/select`,
    method: 'get',
    params
  })
}
//退卡审核记录
export function customerCardReturnDetail(id) {
  return request({
    url: `/asset/card/return/v1/customerCardReturn/detail/${id}`,
    method: 'get',
  })
}
//获取会员卡使用记录 (预付卡)
export function cardBillLs(params) {
  return request({
    url: `/userManager/customer/card/bill/list`,
    method: 'get',
    params
  })
}
// 账单查询-存管释放详情
export function merchantBillDepositInfo(params) {
  return request({
    url: '/merchant/bill/v1/admin/deposit/info',
    method: 'get',
    params
  })
}
// 查询存管账单释放列表
export function merchantBillDepositList(params) {
  return request({
    url: '/merchant/bill/v1/admin/deposit/list',
    method: 'get',
    params
  })
}
// 绑定收款码
export function bingPayCode(data) {
  return request({
    url: `/merchant/fund/account/manage/bing/pay/code`,
    method: 'put',
    data
  })
}

//保险提现查看
export function withdrawDetail(relevancyNo) {
  return request({
    url: `/merchant/bill/v1/ins/withdrawDetail/${relevancyNo}`,
    method: 'get',
  })
}